<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<div th:replace="~{fragment/headFragment :: head}"></div>
<body class="cbp-spmenu-push">
<div class="main-content">
    <div th:replace="~{fragment/left-border :: left}"></div>

    <div th:replace="~{fragment/header :: header}"></div>
    <!-- //header-ends -->
    <!-- main content start-->
    <div id="page-wrapper" >
        <div class="main-page">

            <div class="elements  row">
                <div class="col-md-4 profile widget-shadow chat-mdl-grid" style="width:50%;">
                    <a style="position: absolute;top:10px;left:10px;" th:href="@{/customerInfo/getOne(id=${session.cusID},state=-1,current=1)}"><img style="width:30px;" src="images/customerinfo.png"></a>
                    <div th:if="${session.NAME}ne '??'">
                        <h4 style="color: white;text-align: center;margin-bottom:10px;"  class="title3" th:text="${session.NAME}" ></h4>
                    </div>
                    <div th:if="${session.NAME}eq '??'">
                        <h4 style="color: white;text-align: center;margin-bottom:10px;" class="title3" th:text="${session.name}"></h4>
                    </div>
                    <a style="color:white;position: absolute;right:10px;top:10px;" href="/sessionMessage/lishiduihua"><i class="fa fa-sign-out"></i> 结束对话</a>


                    <tr class="info" th:each="cs,rowInfo : ${messageList2}">


                        <div class="activity-row activity-row1 right" style="padding-left: 38px;" th:if="${cs.getFromvisitor()}">
                            <div class="col-xs-3 activity-img"><img src="images/liaotian.png" class="img-responsive" alt="" style="text-align: right"></div>
                            <div class="col-xs-9 activity-img1">
                                <div class="activity-desc-sub">
                                    <p th:text="${cs.getContent()}"></p>
                                    <span style="color: #03a9f4" th:text="${cs.getSendtime()}"></span>



                                </div>
                            </div>
                            <div class="clearfix"> </div>
                        </div>



                        <div class="activity-row activity-row1 activity-left" style="padding-left: 38px;" th:if="${!(cs.getFromvisitor())}">

                            <div class="col-xs-9 activity-img2" >
                                <div class="activity-desc-sub1">
                                    <p th:text="${cs.getContent()}"></p>
                                    <span style="color: #03a9f4" th:text="${cs.getSendtime()}"></span>



                                </div>
                            </div>
                        <div class="col-xs-3 activity-img"><img th:src="@{${session.cs.getHeadimg()}}" style="height: 60px;" class="img-responsive img-circle" alt=""></div>
                        <div class="clearfix"> </div>
                        </div>


                    </tr>

                    <div class="chat-bottom">

                        <form action="sessionMessage/insertmessage"  method="get">
                            <input type="text" name="cusSerID" style="display: none" th:value="${session.cusSerID}">
                            <input type="text" name="cusID" style="display: none" th:value="${session.cusID}">

                            <input type="text" placeholder="Reply" required="" name="value">
                            <div style="text-align: right;margin-top: 10px;"><input  type="submit" value="发送" ></div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Classie -->
<script src="js/classie.js"></script>
<script>


    var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
        showLeftPush = document.getElementById( 'showLeftPush' ),
        body = document.body;

    showLeftPush.onclick = function() {
        classie.toggle( this, 'active' );
        classie.toggle( body, 'cbp-spmenu-push-toright' );
        classie.toggle( menuLeft, 'cbp-spmenu-open' );
        disableOther( 'showLeftPush' );
    };

    function disableOther( button ) {
        if( button !== 'showLeftPush' ) {
            classie.toggle( showLeftPush, 'disabled' );
        }
    }
</script>
<!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!--//scrolling js-->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.js"> </script>

</body>
</html>